<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>版块</title>
    <link rel="stylesheet" href="../../lib/layui/css/layui.css" />
    <link rel="stylesheet" href="../../css/common/default_style.css" />
    <link rel="stylesheet" href="../../css/templates/pager_style.css" />
    <link rel="stylesheet" href="../../css/pages/block/detail.css">

    <!-- editor.md -->
    <link rel="stylesheet" href="../../lib/editor.md/css/editormd.css" />
</head>
<!-- 使用这个函数读取数据 -->

<body onload="loadData()">
    <!-- 导航 -->
    <div class="breadcrumb-nav">
        /
        <a href="../home.html" style="text-decoration: none  ;"><span class="bc-nav">首页</span></a>
        /
        <span class="">版块 - </span>
        <span class="bc-nav-now"></span>
    </div>

    <div id="main-div">

        <!-- 版块头部 -->
        <div class="block-header">
            <div id="title">
                <h2></h2>
            </div>
            <div class="block-header-li" id="today-post">今日发帖:</div>
            <div class="block-header-li" id="total-post">总帖子数:</div>
            <hr style="background-color:gray;" />
            <div class="post-admin-list">
                <span>版主列表:</span>
            </div>

        </div>
        <!-- 对帖子列表的操作 -->
        <div class="top-div">
            <!-- 分类区域,搜索将在指定分类搜索,包括全部分类按钮-->
            <!-- 添加它的帖子数量 -->
            <div class="clazz-list">
            </div>
            <!-- 搜索区域,包括多个搜索条件,一个排序条件 -->
            <div class="search-div">
                <form id="search-request">
                    <div class="search-request-item">
                        <input type="checkbox" name="search-checkbox" value="post-name"
                            class="search-condition-group" />
                        帖子名: <input type="text" name="post_name" id="post-name">
                    </div>
                    <div class="search-request-item">
                        <input type="checkbox" name="search-checkbox" value="poster-name"
                            class="search-condition-group" />
                        用户名: <input type="text" name="poster_name" id="poster-name">
                    </div>
                    <div class="search-request-item">
                        <input type="checkbox" name="search-checkbox" value="in-date" class="search-condition-group" />
                        发帖时间: <input type="datetime-local" name="in_date" id="in-date">之后
                    </div>
                    <input type="button" value="搜索" class="my-button" style="width: 80px; margin-left: 40px;"
                        onclick="search()" />
                    <hr />
                    排序：
                    <div class="search-request-item">
                        <a onclick="searchPostOrderBy('time')">按发贴时间</a> |
                        <a onclick="searchPostOrderBy('reply_count')">按回复数</a> |
                    </div>
                </form>
            </div>
        </div>
        <!-- 帖子列表 -->
        <div class="post-list">
            <!-- 表头 -->
            <div class="post-list-header">
                <span id="header-post-name">帖子名</span>
                <span id="header-username">作者/发帖时间</span>
                <span id="header-reply-count">回复数</span>
            </div>
            <!-- 表体  -->
            <div class="post-list-content">

            </div>
        </div>
        <!-- 连续加载下一页,调用更新 -->
        <div class="my-button next-page-continuely" onclick="appendNextPage()">
            下一页
        </div>
        <!-- 分页器 -->
        <div class="pager-div">
            <div class="my-button last-page" onclick="lastPage()">上一页</div>
            <div class="page-list">
            </div>
            <div class="my-button next-page" onclick="nextPage()">下一页</div>
            <input type="text" id="jump-input" />
            <div class="my-button" onclick="jumpToPage()">跳转</div>
        </div>
        <!-- 发帖区域 -->

        <div id="new-post-div">
            <div id="new-post-clazz-div" style="display:inline-block">选择分类：
                <select id="new-post-clazz">
                </select>
            </div>
            <span style="margin-left: 30px;">标题：</span>
            <input name="title" id="new-post-title" oninput="checkPostTitleLen()">
            <span id="title-tip">还能输入80字</span>
            <div id="editor" >
            </div>
            <iframe name="upload-iframe" style="display: none" frameborder="0"></iframe>
            <div class="my-button" id="post-btn" onclick="sendPost()"
                style="width: 10%;height: 30px;line-height: 30px;border-radius: 0 10px 10px 10px; margin-left: 45%;">发帖
            </div>
        </div>
    </div>
    <script src="../../lib/layui/layui.js"></script>
    <script src="../../lib/jquery-3.7.0.js"></script>
    <script src="../../lib/editor.md/editormd.min.js"></script>
    <script src="../../js/tools.js"></script>
    <script src="../../js/pages/block/block-page-list.js"></script>
    <script src="../../js/pages/block/send-post.js"></script>
<!--太复杂了吧。。这么多js、、-->
</body>

</html>